<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

<f:view contentType="text/html">
	<h:head>
    	<f:facet name="first">
        	<title>Central de Estagio - Aluno</title>
        </f:facet>
		<link rel="StyleSheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/estilo.css" media="screen" />
        <link type="text/css" rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/css/tema/theme.css"/>
    </h:head>
    <h:body>
<h:form>
<p:tabView>
<p:tab title="Disponíveis">
<div align="center">
<p:dataTable id="tbVagas" var="v" value="#{MBAlunoVagas.listaVagas}" emptyMessage="Nenhum registro foi localizado..." rowIndexVar="index" >  
    		<p:column>    
        		<f:facet name="header">Código</f:facet>    
        		<h:outputText value="#{v.codVaga}"/>         
    		</p:column>
    		<p:column>    
        		<f:facet name="header">CBO</f:facet>    
        		<h:outputText value="#{v.cbo.descCBO}"/>        
    		</p:column>
    		<p:column>    
        		<f:facet name="header">EMPRESA</f:facet>    
        		<h:outputText value="#{v.empregador.nomeEmp}"/>        
    		</p:column>
			<p:column styleClass="textoCen"> 	   	   
        		<p:commandButton icon="ui-icon-circle-check" value="Candidatar-me" action="#{MBAlunoVagas.aceitarVaga}" update="tbVagas" /> 
        		<p:commandButton icon="ui-icon-circle-close" value="Não Interesso" action="#{MBAlunoVagas.recusarVaga}" update="tbVagas"/> 
        	</p:column> 
      		</p:dataTable>
</div>
</p:tab>
<p:tab title="Em Processo Seletivo">
<div align="center">
<p:dataTable id="tbVagasAceitas" var="va" value="#{MBAlunoVagas.listaVagasAceitas}" emptyMessage="Nenhum registro foi localizado..." rowIndexVar="index" >  
    		<p:column>    
        		<f:facet name="header">Código</f:facet>    
        		<h:outputText value="#{va.codVaga}"/>         
    		</p:column>
    		<p:column>    
        		<f:facet name="header">CBO</f:facet>    
        		<h:outputText value="#{va.cbo.descCBO}"/>        
    		</p:column>
    		<p:column>    
        		<f:facet name="header">EMPRESA</f:facet>    
        		<h:outputText value="#{va.empregador.nomeEmp}"/>        
    		</p:column>
      		</p:dataTable>
</div>
</p:tab>
</p:tabView>
 </h:form>       
        </h:body>

	</f:view>

</html>


